package com.xuef.ibatis.session;

import com.xuef.ibatis.executor.Executor;
import com.xuef.ibatis.executor.SimpleExecutor;
import com.xuef.ibatis.mapping.Environment;

import java.sql.Connection;
import java.util.Properties;

/**
 * Created by xuefengDong: moveb
 * On 2019/4/25- 19:47
 * 全局文件配置对象(保存配置信息)
 */
public class Configuration {
    private Environment environment;

    private Properties variables; //properties 标签内容存到这里

    public Configuration(Environment env){
        this.environment = env;
    }
    public Environment getEnvironment() {
        return environment;
    }

    public Executor newExecutor(Connection connection) {
        return new SimpleExecutor(this, connection);
    }
}
